package me.zhengjie.business.util;


import lombok.extern.slf4j.Slf4j;
import me.zhengjie.mi.neww.MyEasyGmUtils;
import me.zhengjie.mi.neww.NewMicEasyGmUtil;
import me.zhengjie.modules.system.service.dto.DeptDto;
import me.zhengjie.utils.SecurityUtils;
import org.springframework.security.core.userdetails.UserDetails;

import java.nio.charset.StandardCharsets;
import java.util.Base64;

/**
 * @Author: 夏洪波
 * @Date: 2021/7/30 17:07
 * @Description:
 */
@Slf4j
public class SmUtilProvince {

    /**
     * sm2生成签名
     */
    public static String sign(String inputStr, DeptDto deptDto) {

        byte[] privateKey = Base64.getDecoder().decode(deptDto.getProvinceSmPrivateKey());
        byte[] assign = NewMicEasyGmUtil.signSm3WithSm2(inputStr.getBytes(StandardCharsets.UTF_8), deptDto.getProvinceClientId().getBytes(StandardCharsets.UTF_8), privateKey);
        return new String(Base64.getEncoder().encode(assign));
    }

    /**
     * sm4加密
     */
    public static String encrypt(String inputStr, DeptDto deptDto) {
        byte[] plain = inputStr.getBytes();
        byte[] bs = NewMicEasyGmUtil.sm4Encrypt(deptDto.getProvinceClientId().getBytes(StandardCharsets.UTF_8), plain);
        return new String(Base64.getEncoder().encode(bs));
    }

    public static void main(String[] args) {
        String ss = "uBBEvPbMD7MWYLyNJKvr4sYeMWVb6MyQ6A7qpJJ2YBBHLzA8yKokW1JGSmyv8GGypyUN9iiZ99r0gJ/1mLHMCnOxINqZZ8JQCpeLx0KSLfZX8gb1X9kl+0c13J5ighSH1PzPDOI6yCGUXQSk4PbXKscjSBQF9piyHLNHL6DDxslaPcXwZpccpab17pWJtYpKH0Zqv6NiTHjpe3qcb2XzF+9jjql4CrnlMfPC7HGnPG5Y8dRU7GVJX+rZsg7POmDQfQf5D/RfDI/l7xnEUB8u26xVEQnZHnfuwLdCapJzpQSF/Qx9LfTc5IQzD4R7IB0SfJ4iNnlJmzbTNXv2+4sk9hsdcN3lTM2zkXm81DnttXhOwStrHCDgLSq61EIKUuA8sItZw9k559wK2583dSnSml743acKBy3Iah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dUNQ+ERw8Xoxxh2ZU1KhkFrbv4/LNLQlqc8+Ib3WT2PPCQ8kw/WzbzpD2IInuwlcg952I14G+diBfDxQNWplU+RZfDLiLOFdZhbod7KMcUYWw4lI/s9zS28sW/1gdtv4ZUIQvBIk/G8JBxYoVEIK1w9rozhyFEaI7ZjzlV3SUVyeFc1t4NW6xN59gCBd5gXLPPAkEK2UCfOZcOB0+w5SnuVpghDs/fPRB7ZiqmSuWtD4mCcI81RhlqxyqCMUaKBYtjI0LJeCiW1lHiGwTJLwCiZzzh8ypRdz8TooPrMLfb6M7mow6/O58PrUUanXozYY17WelGg7f8/wGSsxD145Uz5deB5pUC7U11rEqq8qyqK0WRbK0G8GI/3MWYbNOuEKb5xxNl12l8G4EDE0pjptsj7f7Ah+bvVl5cqxczJiXlhblbNLxeTRVDKZIYUgHC4WEwpZ6Uzy2ka27MSFImmZvgNuInBiraiccNDsa1yTRzlkz6XobjdHizMJ5pkpL/2ondKxKRb7S0HnmT69RfH4y9+AarBnzRo1zQ8k333iwgC5k6N+UUingKqWEgEORB46hpjZnLOn9BSt0Ot5yD+tvq2ABAqS4HmuRzIb6NvlsibMkqxFi/y8CevTfT0G9rMNMNIer4fUtnDYpks6K91AhwcSDABziNhocrykQqgXoLteURWYzrDoSVIsE4uPb+u9K0joiZRYBS3Nfb+o/a19arHNUGBEpgRpqfY7NLp7YDU5IMx5Bt61jRkLr1jivI08/Bhk86aru29N0DkSMND3be6qU4ck+QOVhlDcjyPzGe1r+orFoiuKhk3uR22H2bZqA9KD1QaGddtJlHyOWbOFxTKjpsouCj6nS+sPjcYGsWGVfJ4ygy+kq3jkmrFOHV3/C11e0y+inki3RIOUzuzHAOG3EV1V5eeSx1FTygNPToC8YB1epskvuuUH0TGGTAqhNGnFkVeBB5qfWYEOFsuQ31Di6zb8IXXSF";
/*
        System.out.println(decryptionA(ss, "9063A391947EF5BB"));
        System.out.println(decryptionA(ssc, "9063A391947EF5BB"));
        System.out.println(decryptionA(sss, "9063A391947EF5BB"));*/
         System.out.println(decryptionA(ss, "BD043530BE2A325C"));
        //System.out.println(decryptionA(ss5, "A48647FBA0796A56"));
    }

    /**
     * sm4解密
     */
    public static String decryption(String inputStr, DeptDto deptDto) {
        byte[] bs = NewMicEasyGmUtil.sm4Decrypt(deptDto.getProvinceClientId().getBytes(StandardCharsets.UTF_8), Base64.getDecoder().decode(inputStr));
        return new String(bs);
    }


    public static String decryptionA(String input, String client_id) {
        byte[] bs = NewMicEasyGmUtil.sm4Decrypt(client_id.getBytes(StandardCharsets.UTF_8), Base64.getDecoder().decode(input));
        return new String(bs);
    }
}
